//
// Created by xujingyi on 2021/4/28.
//

#ifndef ALLIANCE_SENTRY_V2_0_SETTER_H
#define ALLIANCE_SENTRY_V2_0_SETTER_H

#include <opencv2/core/core.hpp>
typedef float TYPE_POS;
//typedef double TYPE_PNP;
namespace rm {
    typedef float camera2ptz_Type;

    class Setter {
    public:
        Setter();

//--------------------------------------run_param--------------------------------------
        int fixed_enemy_color = 0;
        int armor_camera_exposure = 3;
        int armor_camera_gain = 0;
        float sentry_height=1300;
        float yaw_angle_compensate=2.5;
        float pitch_angle_compensate=0.0;
        float delay_time_compensate=15;
        float pnp_distance_plus_coefficient=0.9;
        float pitch_gravity_plus_coefficient=1.5;
        float highland_pitch_gravity_plus_coefficient=2.6;
//        float pitch_gravity_compensation=5;
        float serial_yaw_angle_plus_coefficient=1.0;
        float serial_pitch_angle_plus_coefficient=0.3;
        float move_angle_plus_coefficient=1.5;
        float anti_kalman_compensate_coefficient=0.5;
        int up_min_shoot_distance=3200;
        int up_max_shoot_distance=7500;
        int highland_blindview_min_distance=2900;
        int highland_blindview_max_distance=3400;
        int highland_height=300;
        int cruise_judge_speed=600;
        float change_armor_angle=20;

        int anti_switch_cnt_limit=15;
        int keep_searching_for_same_box_limit=5;
        int lost_then_keep_tracking_cnt_limit=8;
        int tracking_time_cnt_limit=150;
        int spinning_time_cnt_limit=50;
        int not_shoot_chassis_speed=1000;
        int switch2gyro_absdif_limit=40;
        int switch2gyro_velocity_limit=40;
/*--------------------------------------预处理--------------------------------------*/
        int red_brightness_threshold_val=120;
        int blue_brightness_threshold_val=180;
        int red_color_channel_threshold_val=220;
        int blue_color_channel_threshold_val=220;
        int red_color_diff_threshold_val=120;
        int blue_color_diff_threshold_val=80;

        int marker_min_peri=10;
        int marker_max_peri=300;
        int marker_min_height_width_ratio=1;
        int marker_max_height_width_ratio=10;
        float marker_min_distance_height_ratio=0.5;
        float marker_middle_distance_height_ratio=3.2;
        float marker_max_distance_height_ratio=5;

        float couple_max_angle_diff=10;
        float couple_max_lengths_ratio=2;
        float couple_min_marker_box_anglediff=20;

        float perspect_num_box_plus_ratio=0.5;
        float rect_num_box_plus_ratio=0.8;
        int tracking_box_plus_ratio = 3;
        int num_threshold=150;
        int num_img_size=28;

        float pass_score=1;
/*--------------------------------------camera_para--------------------------------------*/
        cv::Mat camera_matrix;
        cv::Mat distcoeffs;
        cv::Mat_<TYPE_POS> camera2ptz;//类型不要瞎改！

/*--------------------------------------show_info--------------------------------------*/
        bool show_markers = 0;
        bool show_marker_couples = 0;
        bool show_threshold_num = 1;
        bool show_armor = 1;
        bool show_num_roi = 0;
        bool show_warp_num=0;
        bool show_armors = false;
        bool show_origin = false;
        bool show_preprocess = false;
        bool show_predict_pos_graph = false;
        bool show_plot = false;
        bool show_CSYS = false;
        bool show_midline = true;
        bool show_track_box=true;
        bool show_testboard=false;
        bool wait_uart = false;

        bool show_src_cnt=false;
        bool run_by_frame = 0;

        int save_internal=1;
        bool save_num_picture = false;
        bool save_miss_picture=false;
        bool save_wrong_picture = false;
        bool save_show_picture = false;

        bool print_state_switch_test_info=false;

        ~Setter()=default;
    };
}
#endif //ALLIANCE_SENTRY_V2_0_SETTER_H
